package com.woniu.microcommunityserver.book.service.impl;

import com.woniu.microcommunityserver.book.entity.BookInformationInfoEntity;
import com.woniu.microcommunityserver.book.mapper.BookInformationInfoMapper;
import com.woniu.microcommunityserver.book.service.BookInformationInfoService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@Service
public class BookInformationInfoServiceImpl implements BookInformationInfoService {
    @Resource
    private BookInformationInfoMapper bookInformationInfoMapper;

    @Override
    public List<BookInformationInfoEntity> findAll() {
        return bookInformationInfoMapper.findAll();
    }

    @Override
    public List<BookInformationInfoEntity> findAny(Map<String,Object> map) {
        return bookInformationInfoMapper.findAny(map);
    }

    @Override
    public boolean insertBook(BookInformationInfoEntity bookInformationInfoEntity) {
        return bookInformationInfoMapper.insertBook(bookInformationInfoEntity);
    }

    @Override
    public boolean deleteBook(Integer id) {
        return bookInformationInfoMapper.deleteBook(id);
    }

    @Override
    public boolean loanBook(Integer id) {
        return bookInformationInfoMapper.loanBook(id);
    }

    @Override
    public boolean backBook(Integer id) {
        return bookInformationInfoMapper.backBook(id);
    }

    @Override
    public boolean updateBook(BookInformationInfoEntity bookInformationInfoEntity) {
        return bookInformationInfoMapper.updateBook(bookInformationInfoEntity);
    }
}
